package com.laiketui.mch.controller;

import com.laiketui.common.api.PubliceService;
import com.laiketui.common.utils.tool.ImgUploadUtils;
import com.laiketui.core.annotation.ParamsMapping;
import com.laiketui.core.domain.Result;
import com.laiketui.core.exception.LaiKeAPIException;
import com.laiketui.core.lktconst.GloabConst;
import com.laiketui.domain.lktconst.DictionaryConst;
import com.laiketui.domain.vo.MainVo;
import com.laiketui.domain.vo.main.RefundVo;
import com.laiketui.domain.vo.mch.*;
import com.laiketui.domain.vo.order.OrderSettlementVo;
import com.laiketui.domain.vo.user.AddBankVo;
import com.laiketui.mch.api.ShopBaseService;
import com.laiketui.root.annotation.HttpApiMethod;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 店铺控制类
 *
 * @author Trick
 * @date 2020/9/25 14:10
 */
@Api(tags = "店铺接口")
@RestController
@RequestMapping("/mch")
public class ShopControllor {

    @Autowired
    ShopBaseService shopBaseDubboService;

    @Autowired
    PubliceService publiceService;

    @ApiOperation("申请开店")
    @PostMapping(value = "/apply")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Apply")
    public Result apply(ApplyShopVo vo) {
        try {
            shopBaseDubboService.applyShop(vo);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("我的店铺")
    @PostMapping("/index")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Index")
    public Result index(MainVo vo) {
        try {
            return Result.success(shopBaseDubboService.index(vo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }


    @ApiOperation("获取店铺银行卡列表")
    @PostMapping("/bankList")
    @HttpApiMethod(urlMapping = "mch.App.MchBank.BankList")
    public Result bankList(MainVo vo) {
        try {
            return Result.success(shopBaseDubboService.bankList(vo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("添加店铺银行卡")
    @PostMapping("/addBank")
    @HttpApiMethod(urlMapping = "mch.App.MchBank.AddBank")
    public Result addBank(AddBankVo vo) {
        try {
            shopBaseDubboService.addBank(vo);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("编辑店铺银行卡")
    @PostMapping("/editBank")
    @HttpApiMethod(urlMapping = {"mch.App.MchBank.EditBank"})
    public Result updateBank(AddBankVo vo) {
        try {
            shopBaseDubboService.updateBank(vo);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }


    @ApiOperation("根据id获取店铺银行卡信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "店铺id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/mchBankInfo")
    @HttpApiMethod(urlMapping = {"app.MchBank.mchBankInfo", "mch.App.MchBank.BankPage"})
    public Result mchBankInfo(MainVo vo, int id) {
        try {
            return Result.success(shopBaseDubboService.mchBankInfo(vo, id));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("验证店铺名称")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "店铺名称", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/verify_store_name")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Verify_store_name")
    public Result verifyStoreName(MainVo vo, String name) {
        try {
            return Result.success(shopBaseDubboService.verifyStoreName(vo, name));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("入住协议")
    @PostMapping("/agreement")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Agreement")
    public Result agreement(MainVo vo) {
        try {
            return Result.success(publiceService.getAgreement(vo.getStoreId(), DictionaryConst.AgreementType.AGREEMENTTYPE_MCH));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("继续开通店铺-获取信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/continue_apply")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Continue_apply")
    public Result continueApply(MainVo vo, @NotNull @RequestParam("shop_id") int shopId) {
        try {
            return Result.success(shopBaseDubboService.continueApply(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("添加(自选)商品页面")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/add_goods_page")
    @HttpApiMethod(urlMapping = "app.mch.add_goods_page")
    public Result addGoodsPage(MainVo vo, @ParamsMapping("shop_id") Integer shopId) {
        try {
            return Result.success(shopBaseDubboService.addGoodsPage(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }


    @ApiOperation("添加(自选)商品页面-加载更多")
    @PostMapping("/add_goods_page_load")
    @HttpApiMethod(urlMapping = {"app.mch.add_goods_page_load", "app.mch.goods_query"})
    public Result addGoodsPageLoad(AddGoodsPageLoadVo vo) {
        try {
            return Result.success(shopBaseDubboService.addGoodsPageLoad(vo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("添加自选商品")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "pro_id", value = "产品id集", required = true, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "label_id", value = "产品id", required = false, dataType = "int", paramType = "form"),
    })
    @PostMapping("/add_goods")
    @HttpApiMethod(urlMapping = {"app.mch.add_goods"})
    public Result addGoods(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("pro_id") String proId, @ParamsMapping("label_id") String labbelId,
                           @ParamsMapping("freight_id") Integer freightId) {
        try {
            shopBaseDubboService.addGoods(vo, shopId, proId, labbelId, freightId);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("获取自选商品信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "goodsId", value = "商品id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/getGoodsInfoById")
    @HttpApiMethod(urlMapping = {"app.mch.see"})
    public Result getGoodsInfoById(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("p_id") int goodsId) {
        try {
            return Result.success(shopBaseDubboService.getZxGoodsInfoById(vo, shopId, goodsId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("上传商品页面渲染")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/upload_merchandise_page")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Upload_merchandise_page")
    public Result uploadMerchandisePage(MainVo vo, @RequestParam("shop_id") int shopId) {
        try {
            Map<String, Object> result = shopBaseDubboService.uploadMerchandisePage(vo, shopId);
            return Result.success(result);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("获取商品类别")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "class_str", value = "商品类型id", dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "brand_str", value = "品牌id", dataType = "int", paramType = "form"),
    })
    @PostMapping("/get_class")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Get_class")
    public Result getClass(MainVo vo, @ParamsMapping("class_str") Integer classId, @ParamsMapping("brand_str") Integer brandId,@ParamsMapping("mch_id")Integer mchId) {
        try {
            Map<String, Object> result = shopBaseDubboService.getClass(vo, classId, brandId,mchId);
            return Result.success(result);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("选择类别")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "class_str", value = "商品类型id", dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "brand_str", value = "品牌id", dataType = "int", paramType = "form")
    })
    @PostMapping("/choice_class")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Choice_class")
    public Result choiceClass(MainVo vo, @ParamsMapping({"cid", "get_class"}) Integer classId, @ParamsMapping("brand_str") Integer brandId,@ParamsMapping("mch_id")Integer mchId) {
        try {
            Map<String, Object> result = shopBaseDubboService.choiceClass(vo, classId, brandId,mchId);
            return Result.success(result);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("获取属性名")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attribute_str", value = "属性id,多个用','", dataType = "string", paramType = "form")
    })
    @PostMapping("/get_attribute_name")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Get_attribute_name")
    public Result getAttributeName(MainVo vo, @ParamsMapping("attribute_str") String attributes) {
        try {
            return Result.success(shopBaseDubboService.getAttributeName(vo, attributes));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("获取属性值")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attribute_str", value = "属性名称", required = true, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "attr_arr", value = "属性一对多,json", dataType = "string", paramType = "form")
    })
    @PostMapping("/get_attribute_value")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Get_attribute_value")
    public Result getAttributeValue(MainVo vo, @ParamsMapping("attribute_str") String attributes, @ParamsMapping("attr_arr") String attrIds) {
        try {
            return Result.success(shopBaseDubboService.getAttributeValue(vo, attributes, attrIds));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("我的商品")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "商户审核状态", required = true, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/my_merchandise")
    @HttpApiMethod(urlMapping = {"mch.App.Mch.My_merchandise", "mch.App.Mch.My_merchandise_load"})
    public Result myMerchandise(MainVo vo, String type, @ParamsMapping("shop_id") Integer shopId, Integer status) {
        try {
            return Result.success(shopBaseDubboService.myMerchandise(vo, shopId, type, status));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("编辑商品(加载数据)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "p_id", value = "产品id", dataType = "int", paramType = "form")
    })
    @PostMapping("/shopModify")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Modify")
    public Result modify(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("p_id") int pid) {
        try {
            return Result.success(shopBaseDubboService.modify(vo, shopId, pid));
        } catch (LaiKeAPIException e) {
            e.printStackTrace();
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("上传商品(保存)")
    @PostMapping("/upload_merchandise")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Upload_merchandise")
    public Result uploadMerchandise(UploadMerchandiseVo vo) {
        try {
            shopBaseDubboService.saveGoods(vo);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("上传图片")
    @PostMapping("/uploadImgs")
    @HttpApiMethod(urlMapping = "mch.App.Mch.UploadImgs")
    public Result uploadImgs(MainVo vo, @ParamsMapping("shop_id") Integer mchId, MultipartFile image) {
        try {
            List<MultipartFile> files = new ArrayList<>();
            files.add(image);
            //上传图片
            List<String> imgUrls = publiceService.uploadImage(files, GloabConst.UploadConfigConst.IMG_UPLOAD_OSS, vo.getStoreType(), vo.getStoreId(), mchId);
            return Result.success(ImgUploadUtils.getUrlPure(imgUrls.get(0), true));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("修改商品库存页面数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "p_id", value = "产品id", dataType = "int", paramType = "form")
    })
    @PostMapping("/up_stock_page")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Up_stock_page")
    public Result upStockPage(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("p_id") int pid) {
        try {
            return Result.success(shopBaseDubboService.upStockPage(vo, shopId, pid));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("修改库存")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "attributeInfo", value = "属性信息集 json", dataType = "string", paramType = "form")
    })
    @PostMapping("/up_stock")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Up_stock")
    public Result upStock(MainVo vo, @ParamsMapping("shop_id") int shopId, String attributeInfo) {
        try {
            shopBaseDubboService.upStock(vo, shopId, attributeInfo);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("提交审核/撤销审核")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "p_id", value = "商品id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/submit_audit")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Submit_audit")
    public Result submitAudit(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("p_id") int pId) {
        try {
            return Result.success(shopBaseDubboService.submitAudit(vo, shopId, pId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("删除商品")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "p_id", value = "商品id", dataType = "int", paramType = "form")
    })
    @PostMapping("/del_my_merchandise")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Del_my_merchandise")
    public Result delMyMerchandise(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("p_id") int pId) {
        try {
            boolean result = shopBaseDubboService.delMyMerchandise(vo, shopId, pId);
            return Result.success(result);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("上/下架商品")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "p_id", value = "商品id 多个用','", dataType = "string", paramType = "form")
    })
    @PostMapping("/my_merchandise_status")
    @HttpApiMethod(urlMapping = "mch.App.Mch.My_merchandise_status")
    public Result myMerchandiseStatus(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("p_id") String pId) {
        try {
            return Result.success(shopBaseDubboService.myMerchandiseStatus(vo, shopId, pId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("编辑商品")
    @PostMapping("/re_edit")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Re_edit")
    public Result reEdit(UploadMerchandiseVo vo) {
        try {
            return Result.success(shopBaseDubboService.reEdit(vo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("店铺主页")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "shopListId", value = "店铺id", dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "longitude", value = "经度", required = true, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "latitude", value = "维度", required = true, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "type", value = "类别 1=推荐,2=全部商品,3=商品分类", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/store_homepage")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Store_homepage")
    public Result storeHomepage(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("shop_list_id") Integer shopListId,
                                String longitude, String latitude, int type) {
        try {
            return Result.success(shopBaseDubboService.storeHomepage(vo, shopId, shopListId, longitude, latitude, type));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("店铺主页-加载更多")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "type", value = "类别 1=推荐,2=全部商品,3=商品分类", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "page", value = "分页", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/store_homepage_load")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Store_homepage_load")
    public Result storeHomepage(MainVo vo, @ParamsMapping("shop_id") int shopId, int type) {
        try {
            return Result.success(shopBaseDubboService.storeHomepageLoad(vo, shopId, type));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("店铺点击收藏按钮")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/collection_shop")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Collection_shop")
    public Result collectionShop(MainVo vo, @ParamsMapping("shop_id") int shopId) {
        try {
            return Result.success(shopBaseDubboService.collectionShop(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("设置店铺页面数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/into_set_shop")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Into_set_shop")
    public Result intoSetShop(MainVo vo, @ParamsMapping("shop_id") int shopId) {
        try {
            return Result.success(shopBaseDubboService.intoSetShop(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("设置店铺")
    @PostMapping("/set_shop")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Set_shop")
    public Result setShop(SetShopVo vo, MultipartFile image) {
        try {
            if (image != null) {
                vo.setFile(image);
            }
            return Result.success(shopBaseDubboService.setShop(vo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("注销店铺")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/cancellation_shop")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Cancellation_shop")
    public Result cancellationShop(MainVo vo, @RequestParam("shop_id") int shopId) {
        try {
            shopBaseDubboService.cancellationShop(vo, shopId);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("我的顾客")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "page", value = "分页", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/shop_customer")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Shop_customer")
    public Result shopCustomer(MainVo vo, @ParamsMapping("shop_id") int shopId) {
        try {
            return Result.success(shopBaseDubboService.shopCustomer(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("我的粉丝")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "商户id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "page", value = "分页", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/shopFans")
    @HttpApiMethod(urlMapping = "mch.App.Mch.ShopFans")
    public Result shopFans(MainVo vo, @ParamsMapping("shop_id") int shopId) {
        try {
            return Result.success(shopBaseDubboService.shopFans(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("移除粉丝")
    @PostMapping("/removeFans")
    @HttpApiMethod(urlMapping = "mch.App.Mch.RemoveFans")
    public Result removeFans(MainVo vo, Integer cid) {
        try {
            shopBaseDubboService.removeFans(vo, cid);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("我的订单")
    @PostMapping("/my_order")
    @HttpApiMethod(urlMapping = {"mch.App.Mch.My_order", "app.mch.my_order_load"})
    public Result myOrder(MchOrderIndexVo vo) {
        try {
            return Result.success(shopBaseDubboService.myOrder(vo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("发货列表显示")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "订单号", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/deliver_show")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Deliver_show")
    public Result deliverShow(MainVo vo, String id) {
        try {
            return Result.success(shopBaseDubboService.deliverShow(vo, id));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("发货点击发货按钮-弹出填写发货信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/into_send")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Into_send")
    public Result intoSend(MainVo vo, @ParamsMapping("shop_id") int shopId) {
        try {
            return Result.success(shopBaseDubboService.intoSend(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("发货")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "sNo", value = "订单号", required = true, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "expressId", value = "快递公司id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "courierNum", value = "快递单号", required = true, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "orderListId", value = "订单明细id集", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/send")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Send")
    public Result send(MainVo vo, @ParamsMapping("shop_id") int shopId, String sNo, @ParamsMapping("express_id") Integer expressId,
                       @ParamsMapping("courier_num") String courierNum, @ParamsMapping("orderList_id") String orderListId) {
        try {
            shopBaseDubboService.send(vo, shopId, sNo, expressId, courierNum, orderListId);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }


    @ApiOperation("关闭订单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "sNo", value = "订单号", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/closing_order")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Closing_order")
    public Result closingOrder(MainVo vo, @ParamsMapping("shop_id") int shopId, String sNo) {
        try {
            return Result.success(shopBaseDubboService.closingOrder(vo, shopId, sNo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("修改订单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "sNo", value = "订单号", required = true, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "orderDetail", value = "json对象", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/upOrder")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Up_order")
    public Result orderDetails(MainVo vo, @ParamsMapping("shop_id") int shopId, String sNo, String orderDetail) {
        try {
            return Result.success(shopBaseDubboService.upOrder(vo, shopId, sNo, orderDetail));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("订单详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "sNo", value = "订单号", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/order_details")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Order_details")
    public Result orderDetails(MainVo vo, @ParamsMapping("shop_id") int shopId, String sNo) {
        try {
            return Result.success(shopBaseDubboService.orderDetails(vo, shopId, sNo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("订单详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "sNo", value = "订单号", required = true, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "id", value = "售后id", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/Returndetail")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Returndetail")
    public Result returnOrderDetails(MainVo vo, @ParamsMapping("shop_id") int shopId, String sNo, int id) {
        try {
            return Result.success(shopBaseDubboService.returnOrderDetails(vo, shopId, sNo, id));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("我的提现页面")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/my_wallet")
    @HttpApiMethod(urlMapping = "mch.App.Mch.My_wallet")
    public Result myWallet(MainVo vo, @ParamsMapping("shop_id") int shopId) {
        try {
            return Result.success(shopBaseDubboService.myWallet(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }


    @ApiOperation("账户收入/支出")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "type", value = "1=收入 2=支出", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "keyWord", value = "关键字", required = true, dataType = "string", paramType = "form"),
    })
    @PostMapping("/wallet_details")
    @HttpApiMethod(urlMapping = {"app.mch.account_details", "app.mch.account_details_load"})
    public Result walletDetails(MainVo vo, @ParamsMapping("shop_id") int shopId, int type, String keyWord) {
        try {
            return Result.success(shopBaseDubboService.walletDetails(vo, shopId, type, keyWord));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("账户明细")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "type", value = "1=售后明细 2=提现明细", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "tabIndex", value = "0：审核中 1：审核通过 2：拒绝", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "startDay", value = "开始时间", required = false, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "endDay", value = "结束时间", required = false, dataType = "string", paramType = "form"),
            @ApiImplicitParam(name = "orderNo", value = "订单号", required = false, dataType = "string", paramType = "form")
    })
    @PostMapping("/account_details")
    @HttpApiMethod(urlMapping = {"mch.App.Mch.Detail"})
    public Result accountDetails(MainVo vo, @ParamsMapping("shop_id") int shopId, int type, int tabIndex,String startDay,String endDay,String orderNo) {
        try {
            return Result.success(shopBaseDubboService.accountDetails(vo, shopId, type, tabIndex,startDay,endDay,orderNo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("提现明细")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "id", value = "提现id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/Withdrawal_details")
    @HttpApiMethod(urlMapping = {"app.mch.Withdrawal_details"})
    public Result withdrawalDetails(MainVo vo, @ParamsMapping("shop_id") int shopId, int id) {
        try {
            return Result.success(shopBaseDubboService.withdrawalDetails(vo, shopId, id));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("删除提现明细")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "id", value = "提现id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/delWithdrawalDetails")
    @HttpApiMethod(urlMapping = {"app.mch.del_Withdrawal_details"})
    public Result delWithdrawalDetails(MainVo vo, @ParamsMapping("shop_id") int shopId, int id) {
        try {
            return Result.success(shopBaseDubboService.delWithdrawalDetails(vo, shopId, id));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("添加我的门店")
    @PostMapping("/add_store")
    @HttpApiMethod(urlMapping = {"mch.App.Mch.Add_store"})
    public Result addStore(AddStoreVo vo) {
        try {
            return Result.success(shopBaseDubboService.addStore(vo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("编辑我的门店页面数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "id", value = "门店id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/edit_store_page")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Edit_store_page")
    public Result editStorePage(MainVo vo, @ParamsMapping("shop_id") int shopId, int id) {
        try {
            return Result.success(shopBaseDubboService.editStorePage(vo, shopId, id));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("编辑我的门店")
    @PostMapping("/edit_store")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Edit_store")
    public Result editStore(AddStoreVo vo) {
        try {
            return Result.success(shopBaseDubboService.editStore(vo));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("删除我的门店")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "id", value = "门店id集", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/del_store")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Del_store")
    public Result delStore(MainVo vo, @ParamsMapping("shop_id") int shopId, String id) {
        try {
            return Result.success(shopBaseDubboService.delStore(vo, shopId, id));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }


    @ApiOperation("查看我的门店")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/see_my_store")
    @HttpApiMethod(urlMapping = {"mch.App.Mch.See_my_store"})
    public Result seeMyStore(MainVo vo, @ParamsMapping("shop_id") int shopId) {
        try {
            return Result.success(shopBaseDubboService.seeMyStore(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("验证码扫码订单信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "extraction_code", value = "提货码", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/orderInfoForCode")
    @HttpApiMethod(urlMapping = {"mch.App.Mch.OrderInfoForCode"})
    public Result orderInfoForCode(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("order_id") Integer orderId, @ParamsMapping("extraction_code") String extractionCode) {
        try {
            return Result.success(shopBaseDubboService.orderInfoForCode(vo, shopId, orderId, extractionCode));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("验证码提货")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "extraction_code", value = "提货码", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/verification_extraction_code")
    @HttpApiMethod(urlMapping = {"app.mch.verification_extraction_code", "mch.App.Mch.Sweep_extraction_code"})
    public Result verificationExtractionCode(MainVo vo, @ParamsMapping("shop_id") int shopId, @ParamsMapping("order_id") Integer orderId,
                                             @ParamsMapping("extraction_code") String extractionCode) {
        try {
            return Result.success(shopBaseDubboService.verificationExtractionCode(vo, shopId, orderId, extractionCode));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("显示省份")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "sel_city", value = "已选中省份", dataType = "string", paramType = "form")
    })
    @PostMapping("get_sheng")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Get_sheng")
    public Result getSheng(String sel_city) throws LaiKeAPIException {
        try {
            return Result.success(publiceService.getJoinCityCounty(DictionaryConst.Position.LEVEL_2, 0, sel_city));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }


    @ApiOperation("运费列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/freight_list")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Freight_list")
    public Result freightList(MainVo vo, @ParamsMapping("shop_id") Integer shopId) {
        try {
            return Result.success(shopBaseDubboService.freightList(vo, shopId));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("添加运费")
    @PostMapping("/freight_add")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Freight_add")
    public Result freightAdd(AddFreihtVo vo) {
        try {
            shopBaseDubboService.addFreight(vo);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("编辑运费")
    @PostMapping("/freight_modify")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Freight_modify")
    public Result freightModify(AddFreihtVo vo) {
        try {
            shopBaseDubboService.addFreight(vo);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("修改默认运费")
    @PostMapping("/set_default")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Set_default")
    public Result setDefault(AddFreihtVo vo) {
        try {
            shopBaseDubboService.setDefault(vo);
            return Result.success(true);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("删除运费")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "运费id集", required = true, dataType = "string", paramType = "form")
    })
    @PostMapping("/freight_del")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Freight_del")
    public Result freightDel(MainVo vo, @ParamsMapping("id") String id, @ParamsMapping("shop_id") int shopId) {
        try {
            shopBaseDubboService.freightDel(vo, id, shopId);
            return Result.success(true);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("编辑运费页面数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "店铺id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "id", value = "运费id", required = true, dataType = "int", paramType = "form")
    })
    @PostMapping("/freight_modify_show")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Freight_modify_show")
    public Result freightModifyShow(MainVo vo, @ParamsMapping("shop_id") int shopId, int id) {
        try {
            Map<String, Object> resultMap = shopBaseDubboService.freightModifyShow(vo, shopId, id);
            return Result.success(resultMap);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("售后审核通过/拒绝")
    @PostMapping("/examine")
    @HttpApiMethod(urlMapping = "mch.App.Mch.Examine")
    public Result examine(RefundVo vo) {
        try {
            shopBaseDubboService.examine(vo);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }


    @ApiOperation("银行卡解绑【店铺】")
    @PostMapping("/delBank")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "bankId", value = "银行卡id", required = true, dataType = "int", paramType = "form")
    })
    @HttpApiMethod(urlMapping = {"mch.App.MchBank.DelBank"})
    public Result delBank(MainVo vo, @ParamsMapping("id") int bankId) {
        try {
            shopBaseDubboService.delBank(vo, bankId);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("结算列表及详情")
    @PostMapping("/getSettlementOrderList")
    @HttpApiMethod(urlMapping = "mch.App.Mch.GetSettlementOrderList")
    public Result getSettlementOrderList(OrderSettlementVo vo) {
        try {
            Map<String, Object> resultMap = shopBaseDubboService.getSettlementOrderList(vo);
            return Result.success(resultMap);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("添加门店账户")
    @PostMapping("/addMchStoreAccount")
    @HttpApiMethod(urlMapping = {"app.mch.addMchStoreAccount"})
    public Result addMchStoreAccount(MchStoreAccountVo vo) {
        try {
            shopBaseDubboService.addMchStoreAccount(vo);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("删除门店账户")
    @PostMapping("/delMchStoreAccount")
    @HttpApiMethod(urlMapping = {"app.mch.delMchStoreAccount"})
    public Result delMchStoreAccount(MainVo vo, Integer id) {
        try {
            shopBaseDubboService.delMchStoreAccount(vo, id);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("门店账户列表")
    @PostMapping("/mchStoreAccountList")
    @HttpApiMethod(urlMapping = "app.mch.mchStoreAccountList")
    public Result mchStoreAccountList(MchStoreAccountVo vo) {
        try {
            Map<String, Object> resultMap = shopBaseDubboService.mchStoreAccountList(vo);
            return Result.success(resultMap);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("上传收款二维码")
    @PostMapping("/collectionCode")
    @HttpApiMethod(urlMapping = {"app.mch.collectionCode"})
    public Result collectionCode(MainVo vo, Integer mchId, String code) {
        try {
            shopBaseDubboService.collectionCode(vo, mchId, code);
            return Result.success(GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("获取门店管理员列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "mch_store_id", value = "门店id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "account_number", value = "管理员账号", required = true, dataType = "int", paramType = "form"),
    })
    @PostMapping("/AdminList")
    @HttpApiMethod(apiKey = "mch.App.Mch.StoreAdminList")
    public Result getAdminList(MainVo vo, Integer mch_store_id) {
        try {
            return Result.success(shopBaseDubboService.StoreAdminList(vo, mch_store_id));
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("添加修改管理员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "mch_store_id", value = "门店id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "account_number", value = "管理员账号", required = true, dataType = "int", paramType = "form"),
    })
    @PostMapping("/AddAdmin")
    @HttpApiMethod(apiKey = "mch.App.Mch.AddStoreAdmin")
    public Result addAdmin(MainVo vo, Integer mch_store_id, String account_number, String password, Integer id) {
        try {
            shopBaseDubboService.addAdmin(vo,  mch_store_id, account_number, password, id);
            return Result.success(com.laiketui.core.lktconst.GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

    @ApiOperation("删除管理员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "mch_store_id", value = "门店id", required = true, dataType = "int", paramType = "form"),
            @ApiImplicitParam(name = "id", value = "管理员id", required = true, dataType = "int", paramType = "form"),
    })
    @PostMapping("/DelAdmin")
    @HttpApiMethod(apiKey = "mch.App.Mch.DelStoreAdmin")
    public Result delAdmin(MainVo vo, Integer mch_store_id,  Integer id) {
        try {
            shopBaseDubboService.delAdmin(vo,  mch_store_id, id);
            return Result.success(com.laiketui.core.lktconst.GloabConst.ManaValue.MANA_VALUE_SUCCESS);
        } catch (LaiKeAPIException e) {
            return Result.error(e.getCode(), e.getMessage());
        }
    }

}
